home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
utility
/
picnic1.zip
/
PICNIX.DOC
< prev
Wrap
Text File
|
1987-02-22
|
23KB
|
570 lines
THE PiCnix Package (PC Version):
--------------------------------
This document describes the PC Version of the PiCnix* package by
Peter Stephen Heitman. The utilities in the PiCnix package emulate
the functionality of UNIX* System V commands as completely as possible
for MS-DOS* and PC-DOS* users. The utilities included in the PiCnix
package are:
Name: cat - file listing utility
Usage: cat [-u] [-s] [ -v [-t] [-e] ] file1 ...
Version: 2.0 for PCs with DOS 2.1 and higher
Name: chlabel - set the volume label
Usage: chlabel \<volume label>\ [drive specifier]
Version: 2.0 for PCs with DOS 2.1 and higher
Name: chmod - update attribute bits of files
Usage: chmod <mode> file1 ...
Version: 2.0 for PCs with DOS 2.1 and higher
Name: cp - copy files
Usage: cp file1 file2
cp file1 ... fileN directory
Version: 2.0 for PCs with DOS 2.1 and higher
Name: cpdir - copy a directory
Usage: cpdir Dir1 Dir2
Version: 2.0 for PCs with DOS 2.1 and higher
Name: df - print disk free space information
Usage: df [ -a | { drive specifier }* ]
Version: 2.0 for PCs with DOS 2.1 and higher
Name: diff - find differences between two text files
Usage: diff [ -e ] [ -b ] [ -h ] oldfile newfile
Version: 2.0 for PCs with DOS 2.1 and higher
Name: du - disk usage utility
Usage: du [ -a ] [ -r ] [ -s ] [ names ]
Version: 2.0 for PCs with DOS 2.1 and higher
Name: fgrep - fast text search through files
Usage: fgrep [ -vclxins? ] <pattern> file1 ...
Version: 2.0 for PCs with DOS 2.1 and higher
Name: grep - regular expression search through files
Usage: grep [ -vclins? ] <pattern> file1 ...
Version: 2.0 for PCs with DOS 2.1 and higher
Name: ls - directory listing utility
Usage: ls [ -cx1lmetsurpfaRd? ] [ names ]
Version: 2.0 for PCs with DOS 2.1 and higher
Name: more - file listing utility
Usage: more [ -cx1lmetsurpfaRd? ] [ file1 ... ]
Version: 2.0 for PCs with DOS 2.1 and higher
Name: mv - move files
Usage: mv [-f] file1 file2
mv [-f] file1 ... fileN directory
Version: 2.0 for PCs with DOS 2.1 and higher
Name: mvdir - move a directory
Usage: mvdir Dir1 Dir2
Version: 2.0 for PCs with DOS 2.1 and higher
Name: ncd - change to directory
Usage: ncd [ - | new-directory ]
Version: 2.0 for PCs with DOS 2.1 and higher
Name: ndate - set and display current date and time
Usage: ndate [ mmddhhmm[yy] ] [+<format string>]
Version: 1.0 for PCs with DOS 2.1 and higher
Name: necho - echo arguments
Usage: necho <argument list>
Version: 2.0 for PCs with DOS 2.1 and higher
Name: nset - set and display the command processor's environment
Usage: nset [ <name>=[<parameter>] ]
Version: 1.0 for PCs with DOS 2.1 and higher
Name: unset - delete a string from the command processor's environment
Usage: unset <name>
Version: 1.0 for PCs with DOS 2.1 and higher
Name: ntime - time a command
Usage: ntime <command string>
Version: 1.0 for PCs with DOS 2.1 and higher
Name: pwd - print the working directory
Usage: pwd [ -a | { drive specifier }* ]
Version: 2.0 for PCs with DOS 2.1 and higher
Name: rm - remove files
Usage: rm [ -i ] [ -f ] [ -r ] file ...
Version: 2.0 for PCs with DOS 2.1 and higher
Name: show - find a file along a path
Usage: show [ -a ] [ -p <environment variable> ] file1 ...
Version: 2.0 for PCs with DOS 2.1 and higher
Name: strings - print ASCII strings embedded in binary files
Usage: strings [ -t <n>] [ -n <n>] [ file1 ... ]
Version: 1.0 for PCs with DOS 2.1 and higher
Name: switchar - set or display the current system switch character
Usage: switchar [ <new-switchar> | '<new-switchar>' | \<new switchar>\ ]
Version: 2.0 for PCs with DOS 2.1 and higher
Name: tee - create multiple outputs from the input
Usage: tee [ -a ] file ..."
Version: 2.0 for PCs with DOS 2.1 and higher
Name: touch - update last-write times of files
Usage: touch [ -c ] [ mmddhhmm[yy] ] file1 ...
Version: 2.0 for PCs with DOS 2.1 and higher
Name: wc - word counter
Usage: wc [ -l ] [ -w ] [ -c ] [ file1 ... ]
Version: 2.0 for PCs with DOS 2.1 and higher
The utilities are distributed in 6 archives to keep the size down
to less than 70 Kbytes apiece. The archives are:
PiCnix1.arc: cat.exe chlabel.exe chmod.exe cp.exe cpdir.exe
PiCnix2.arc: df.exe diff.exe du.exe
PiCnix3.arc: fgrep.exe grep.exe ls.exe time.exe
PiCnix4.arc: more.exe mv.exe mvdir.exe ncd.exe
PiCnix5.arc: ndate.exe necho.exe nset.exe unset.exe pwd.exe rm.exe
PiCnix6.arc: show.exe strings.exe switchar.exe tee.exe touch.exe wc.exe
* PiCnix is a trademark of Peter Stephen Heitman
* UNIX is a trademark of Bell Laboratories.
* MS-DOS is a U.S. registered trademark of Microsoft, Incorporated.
* PC-DOS is a trademark of International Business Machines.
CONDITIONS FOR USE AND DISTRIBUTION:
-----------------------------------
PiCnix is being distributed under the user-distributed concept.
Please pass this package on to others and upload it to your favorite
computer bulletin board, but please make sure you give them the
complete PiCnix package, including this document. You also may not
misrepresent, either by commission or omission, the conditions
under which this program is being distributed.
If you use any of the utilities in this package on a regular
basis, it is requested that you register as a user of PiCnix by
sending a donation of $15 to the author. A registration form is
provided below for your convenience. Your donation will help
support improvements and additions to the PiCnix package. Your
registration will entitle you to receiving notices when updates are
available and will allow you to order the updated versions of the
package for only $10 per update. When you register, please include
your name and address so that notices of updates may be sent to you.
If you are registered as a user of the PiCnix package, the source
for all of these utilities, including the sources for the
underlying libraries, is available for an additional fee. The
source currently consists of over one megabyte of 'C' and assembly
code written for the C-Ware DeSmet Compiler. One library of
particular interest will be the code that provides for command line
argument expansion that is consistent with the argument expansion
provided by Unix. The only restrictions on the use of this source
code is that you may not create a competing product and a copyright
notice is required when using some of the included libraries. No
warranty is given that these sources will be suitable for any
particular purpose.
Of course, anyone may send in bug reports and suggestions for how
the package may be improved. Please try to describe the bug as
completely and accurately as possible along with a description of how
it may be reproduced consistently (if you know). I am very interested
in making the PiCnix package completely bug free, so please help me by
reporting any bugs you encounter. Suggestions for how the package may
be improved are always welcome, particularly suggestions about which
System V commands to implement next.
Date: ____________________
PiCnix Package
Peter Stephen Heitman
P.O. Box 658
Hadley, MA 01035
Version of the PiCnix package: PC Version
Release Date of this package: January 1, 1987
Registration Fee: ($15.00) _________
Ordering the most recent update: ($10.00) _________
Ordering the sources: ($30.00) _________
Total: _________
NOTE: You must be currently registered as a user or
must include your $15.00 registration fee with
your order to be able to order an update or the
sources.
Select ONE: 360K Floppies ______ 1.2M Floppies ______
YOUR NAME: ________________________________________________
YOUR ADDRESS: ________________________________________________
________________________________________________
____________
IMPORTANT THINGS TO KNOW BEFORE USING PiCnix:
---------------------------------------------
All the utilities in the PiCnix package share a common command
line format, in general the command line for each will look like the
following.
COMMAND argument1 .... argumentN
The possible arguments are described more fully in the following
sections.
Arguments:
Options:
The Options are also referred to as switches and are used to
modify the action or purpose of a COMMAND. All the options
for a COMMAND are grouped before the first filespec. Options
are distinguished from filespecs by the very first character
called a switch character. The switch character is user
definable but will be a '/' whenever the computer is first
turned on.
I have supplied a utility called SWITCHAR that will allow you
to show what the current system switch character is and to
set the system switch character to a new value. You may want
to change the system switch character to a minus sign '-' to
be consistent with the switch character assumed by Unix and
to get filenames printed out in lower case. The switch
character that you select will determine other things. If
you use the default switch character of '/', the following
will be used:
On input, the single-escape will be a pound sign '#'.
On output, the directory separator will be a back-slash
'\'. and filenames will be printed in UPPER CASE.
If you use a switch character different than the default '/', the
following will be used:
On input, the single-escape will be a back-slash '\'.
On output, the directory separator will be a slash '/'.
and filenames will be printed in lower case.
The single-escape character is explained below.
switch character:
If the switch character is at the beginning of an argument,
that argument is assumed to be an option.
single-escape:
The single-escape causes the next character to not be treated
specially. For example, a space or a tab normally separates
one argument from another. By using the single-escape, it is
possible to make one argument out of two words. If the
single escape is a back slash '\', the following is one
argument:
one\ argument
The utility would see the argument as being a string of 12
characters "one argument", including the space. This is
particularly useful for the utilities fgrep and grep, which
search for a string in a list of files. The single escape
also causes the special characters single quote ', double
quote '"', dollar sign '$', star '*', question mark '?', left
bracket '[' and single-escape to not be special if the
single-escape appears immediately before the special character.
NOTE: The single escape is removed from the argument unless
the argument is enclosed in single quotes. In order
to get a single-escape in the argument, use two of
them. The first single-escape causes the second one
to not be treated specially.
dollar sign '$':
The dollar sign signals the beginning of an environment
variable. The characters beginning right after the dollar
sign and continuing until the first character that is not a
digit or a letter is assumed to be an environment variable.
If that sequence of characters IS an environment variable,
the value of the environment variable is inserted in its
place on the command line. For example, assume that the
command line argument is: $lib/myfile. If at the DOS prompt
you had previously entered the command:
SET LIB=/source
$lib/myfile would be interpreted as /source/myfile. If $lib
was not defined (did not exist in the current environment),
the utility would see that argument as /myfile. The $lib
would be ignored completely.
Environment variables are defined using the DOS command SET,
or the PiCnix command NSET, and are active until deleted or
the system is re-started. Please see the section in your DOS
manual about the SET command for additional information.
Many of the utilities in the PiCnix package use environment
variables to set or change default options.
single quote ':
The single quote is used to make one argument out of a string
of words. For example:
'this is one argument'
NOTE: Everything inside of a single quoted string is passed
to the application as is. No expansion of environment
variables or wildcard characters are done.
double quote '"':
The double quote is like the single quote except that the
single-escape and the dollar sign (described below) ARE
expanded.
accent grave '`':
The accent grave is used to mark the beginning and end of a
command string whose output should be substituted as all or
part of the argument. For example, the command:
nset pwd = `pwd`
causes the environment variable PWD to be set to the value of
the current working directory. This is useful if later you
want to return to that same directory. This can be done with
the command:
ncd $pwd
Note that embedded and trailing newlines in the output of the
embedded command are converted to spaces.
Filespecs:
File specifiers are made from 3 parts,
Wildcard characters * ?
Environment variables $variable
Character classes [abf...]
For example:
necho $user\*
uses the value of the environment variable "user"
as the path
necho *a*
operates on file names that contain at least 1 'a'.
necho *.[qrzg]
expands to match any file with a 1 character
extension that is either q,r,z or g
necho test?.*
will match all file names that have 5 characters in
the name before the extension and the first 4
characters are "test"
These characters enable you to specify patterns that can
match 0, 1, or many filenames. If more than one filename is
matched, all of the filenames that matched become arguments
to the utility. For example, since a star '*' all by itself
matches all filenames in the current directory, the command
more * is the same as more <file1> <file2> <file3> ...
Let's assume that the following files are in the current
directory:
C1.A C1.B B1.A B1.B MYFILE BLAH
star '*':
The star '*' matches 0 or more characters in a filename,
including the dot '.'. The argument * would be expanded
into all of the filenames in the current directory. The
argument B* would expand into 3 filenames, B1.A B1.B and
BLAH. The argument *1.A would expand into 2 filenames,
C1.A and B1.A. The argument C*1.A would expand into one
filename, C1.A.
question mark '?':
The question mark '?' matches any one character,
including the dot '.'. For example, the argument C1.?
would expand into the filenames C1.A and C1.B. However,
the argument C1?.A would not match any of the filenames
in the current directory and so would not be expanded.
left and right brackets '[' and ']':
The left and right brackets [] are used to construct
character classes. Character classes are matched
against any ONE (1) character, in the same manner as the
question mark '?'. The left bracket '[' begins the
character class and the right bracket ']' ends the
character class. A character class contains a list of
the characters that are allowed to match. For example,
the argument C1.[ABC] contains a character class that
has three characters, A, B and C. This argument would
be expanded into two filenames, C1.A and C1.B .
Character classes can also contain ranges of characters.
For example, the pattern C1.[ABC] is equivalent to the
pattern C1.[A-C]. Finally, if the first character in a
character class is an exclamation point '!', the
character class matches any character that is NOT
specified between the brackets. Thus, the argument
[!B]1.A would expand into the filename C1.A.
NOTE: as a special case, patterns that end in a dot '.' will
not match any filenames that have extensions. For
example, the pattern *. will match all filenames in
the current directory that do not have an extension.
Getting help for each utility:
Each utility in the PiCnix package will display a brief
summary of what it does and what each of the command line
options are if you execute it with the argument <switch
character>?. For example, if your switch character is the
default '/', you can find out what the utility 'more' does by
executing the following line at the DOS prompt:
more /?
NOTE: In the description for each utility, command line
options are shown with the switch character being a
minus sign '-'. You need to substitute the switch
character you are using if it is not the minus sign.
History Log for PiCnix releases:
First Dated Release: January 1, 1987
Included in first dated release:
cat.exe chlabel.exe chmod.exe cp.exe cpdir.exe
df.exe diff.exe du.exe
fgrep.exe grep.exe ls.exe
more.exe mv.exe mvdir.exe ncd.exe
ndate.exe necho.exe nset.exe unset.exe pwd.exe rm.exe
show.exe strings.exe switchar.exe tee.exe touch.exe wc.exe
New in this release:
ndate.exe nset.exe unset.exe ntime.exe strings.exe
Modified in this release:
All of the utilities have had the following changed:
1) The accent grave processing in the command line has
been added. The single escape character has been
changed to a pound sign '#' when the switch character
is the forward slash '/'.
2) if a drive specifier is provided to a filespec, a slash
character is inserted after the ':' if one is not
already there. For example,
cp a:this .
will become a:/this before cp checks for the file.
cp.exe, cpdir.exe, mv.exe, mvdir.exe:
Modified the buffer size for copies to 32K from 8K.
diff.exe : fixed the case where a directory is given as one of the
filenames. Before, the entire pathname of the other
argument was appended to the directory name. Now, only
the filename part of the other argument is appended to the
directory.
fgrep.exe : fixed -i (ignore case) option. Before fix, lines with
matching pattern were printed in all lower case. Now,
lines with matching pattern are printed as they were
read from the file.
grep.exe : added -i (ignore case) option. Before, this option would
report that it wasn't implemented.
ls.exe : fixed the -u (unsorted filenames) option. Before, sorting
of filenames was done at a very low level and it was not
an option to not do the sorting. Now the low level routines
can be told not to do the sorting.
ncd.exe : changed the method by which the environment is modified.
The old ncd would not work correctly in batch files. It
left a copy of itself around in memory.
pwd.exe : pwd no longer allows arguments other than -?. pwd always
shows the current working directory on the default drive
only.
rm.exe : now correctly removes hidden and system files during the
-r (recursive) option.
show.exe : fixed -p (search path) option. Before fix, if the command
line argument was -pPATH with no space between the -p and
the path, this would not be handled correctly. Also, it
is now allowed to specify the path in lower case, i.e.,
-p path.